Define a Flow Trigger for Workflow (Pilot)
- From Setup, enter Flow Triggers inthe Quick Find box, then select Flow Triggers.
- Click New Flow Trigger.
- Select the same object as the workflow rule, and then click Next.
- Configure the flow trigger.FieldDescriptionNameName of the flow trigger.Unique NameEnter a unique name to refer to this component in the API. TheUnique Name field can contain only underscores and alphanumeric characters. It must be unique within the selected object type, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.Protected ComponentReserved for future use.FlowUnique name of the autolaunched flow that this workflow action launches.Set Flow VariablesWhether to pass values into the flow’s variables and sObject variables.
- If you select Set Flow Variables, specify their names and values.Click Set Another Value toset up to 25 variables.FieldDescriptionNameSelect the name of the flow variable or sObject variable.Only variables whose Input/Output Type allow input access can be selected.ValueFor a flow variable, you can:Enter a literal value.Click , select a field, and click Insert.For an sObject variable, you can:Click , select an sObject record, and click Insert. To help you distinguish between sObject records and fields, all sObject record options are marked with an asterisk (*) and appear at the top of each list.Enter {!this} to use the current values of the record that was created or edited to cause the workflow rule to fire.Enter {!old} to use the most recent previous values of the record that was edited to cause the workflow rule to fire. In other words, {!old} identifies the same record as {!this} but uses the record’s values from immediately before it was edited to cause the workflow rule to fire.NoteIf the record was newly created, {!old} is null.Unlike {!this}, {!old} can’t be selected by clicking . You must manually enter {!old} in the Value column.
- Enter a literal value.
- Click , select a field, and click Insert.
- Click , select an sObject record, and click Insert. To help you distinguish between sObject records and fields, all sObject record options are marked with an asterisk (*) and appear at the top of each list.
- Enter {!this} to use the current values of the record that was created or edited to cause the workflow rule to fire.
- Enter {!old} to use the most recent previous values of the record that was edited to cause the workflow rule to fire. In other words, {!old} identifies the same record as {!this} but uses the record’s values from immediately before it was edited to cause the workflow rule to fire.
- If the record was newly created, {!old} is null.
- Unlike {!this}, {!old} can’t be selected by clicking . You must manually enter {!old} in the Value column.
- To put the flow trigger in test mode, select Administrators run the latest flow version. When selected and an administrator triggers the workflow rule, the flow trigger launches the latest version of the flow. For all other users, the flow trigger always launches the active version of the flow.The same values are passed into the flow variables and sObject variables whether the flow trigger launches the active or latest flow version.
- Click Save.